package dao;

import java.sql.ResultSet;

import util.Database;

public class AdminDao {

	public String login(String username,String password){
		String sql = "select* from admin where adminname='"+username+"' and password='"+password+"'"; //" AND password= '"+password+"'";
		ResultSet rs =Database.query(sql);
		String b = null;
		try{
			if(rs.next())
			b = rs.getString("aid");
		}
		catch(Exception e){
			e.printStackTrace();
		}
		finally{
			
		}
		return b;	
	}
}
